-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add organization id to the provider. #110
Conversation
@medains this looks great, but we've changed the provider to https://github.com/grafana/grafana-api-golang-client since you opened it. This is so we can have folks in the |
Will do, thanks. |
Updated, rebased and the PR opened on the new client repo. |
Updates, rebased and applied changes based on the now-accepted change to the client api |
Use the change in grafana/grafana-api-golang-client#9 to apply an organization id to the provider. Usage might look like this: ```hcl provider "grafana" { url = "someurl" auth = "adminuser:somepass" } resource "grafana_organization" "neworg" { name = "neworg" admin = "neworgadmin" } provider "grafana" { alias = "neworg" url = "someurl" auth = "neworgadmin:somepass" org_id = grafana_organization.neworg.org_id } resource "grafana_data_source" "neworg_graphite" { provider = grafana.neworg type = "graphite" name = "neworg-graphite" } ``` Co-authored-by: hansnqyr <[email protected]>
Any chance for this to be merged in the near future? |
@trotttrotttrott - the api changes got merged a while ago, can we get this merged now? |
Yes, also very looking forward into this change being merged! |
Noticed when using this in anger that the schema TypeInt conversion to int64 for the api library needed a bit of work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @medains!
Noticed when using this in anger that the schema TypeInt conversion to int64 for the api library needed a bit of work.
Could you elaborate on this?
Yes:
The previous code |
Use the change in grafana/grafana-api-golang-client#9 (previous submitted to nytm/go-grafana-api#62) to
apply an organization id to the provider.
Usage might look like this:
Co-authored-by: hansnqyr [email protected]
This is obviously dependent on the go-grafana-api PR, and addresses the same issue that @bcampoli was addressing in https://github.com/terraform-providers/terraform-provider-grafana/pull/60